"""
File: log_utils.py
Author: ershixiong
Date: 2023/11/21
describe:

"""

import logging

# 创建logger实例
logger = logging.getLogger('simple example')
# 设置日志级别
logger.setLevel(logging.DEBUG)
# 流处理器
ch = logging.StreamHandler()
ch.setLevel(logging.DEBUG)

# 日志打印格式
formatter = logging.Formatter('%(asctime)s %(name)s %(levelname)s %(message)s')
# 添加格式配置
ch.setFormatter(formatter)
# 添加日志配置
logger.addHandler(ch)
